﻿// ....................................................................................................................
//	Author: Copyright (C) 2012 Ing. Marek Hubal
//	Email: hubal@acasoftware.org
// ....................................................................................................................

using System;

namespace core
{
    /// <summary>Trieda IFileExplorer_BaseProgressForm</summary>
    public class IFileExplorer_BaseProgressForm : System.Windows.Forms.UserControl
    {
        protected IFileExplorerPanel FParentPanel; // Rodic
        protected System.Drawing.Color FBackColor;

        /// <summary>Metoda: OnPaint</summary>
        /// <param name="e">parameter</param>
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            using (System.Drawing.SolidBrush B = new System.Drawing.SolidBrush(FBackColor))
            {
                e.Graphics.FillRectangle(B, e.ClipRectangle);
                System.Windows.Forms.ControlPaint.DrawBorder3D(e.Graphics, e.ClipRectangle, System.Windows.Forms.Border3DStyle.Raised);
            }
        }

        /// <summary>Konstruktor</summary>
        public IFileExplorer_BaseProgressForm()
        {
            SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer, true);
            FBackColor = System.Drawing.SystemColors.Window;
        }

        /// <summary>Nastavenie rodica</summary>
        /// <param name="pPanel">panel</param>
        public virtual void SetParent(IFileExplorerPanel pPanel)
        {
            FParentPanel = pPanel;
            CenterPanel(); // Vycentrujem
            pPanel.Controls.Add(this); // Zaradim do control
        }
        /// <summary>Vycentrovanie panela</summary>
        public void CenterPanel()
        {
            System.Drawing.Size CS = FParentPanel.ClientSize;
            Left = (CS.Width - Width) / 2; Top = (CS.Height - Height) / 3; // Vycentrujem
        }

        /// <summary>Aktivacia panela</summary>
        public virtual void ActivatePanel()
        {
        }
        /// <summary>Zobrazenie editora pre vyber hodnoty zo zoznamu</summary>
        /// <param name="pCaption">text okna</param>
        /// <param name="pNames">nazvy volieb</param>
        /// <param name="pNotes">popisy volieb</param>
        /// <param name="pChoice">prednastaveny vyber a vysledok</param>
        /// <returns>true / false</returns>
        public bool ShowEditor_ChooseFromList(string pCaption, string pNames, string pNotes, ref int pChoice)
        {
            int R = FParentPanel.ShowEditor_ChooseFromList(pCaption, pNames, pNotes, pChoice);
            if (R == -1) return false; // Zrusene?
            pChoice = R;
            return true; // Potvrdene
        }
        /// <summary>Zobrazenie editora pre vyber hodnoty zo zoznamu</summary>
        /// <param name="pCaption">text okna</param>
        /// <returns>true / false</returns>
        public bool ShowEditor_EditString(string pCaption, ref string Value, bool pCanBeEmpty = true, int pMaxLength = -1, string pAutoCompleteResourceName = null, string pAutoCompleteData = null, bool pPasswordMode = false)
        {
            string R = FParentPanel.ShowEditor_EditString(pCaption, Value, pCanBeEmpty, pMaxLength, pAutoCompleteResourceName, pAutoCompleteData, pPasswordMode);
            if (R == null) return false; // Zrusene?
            Value = R;
            return true; // Potvrdene
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ResultInfo</summary>
    public class IFileExplorer_ProgressForm_ResultInfo : IFileExplorer_BaseProgressForm
    {
        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_OK;
        protected IHorizontalSplitLine FLine;

        public IFileExplorerPanel ParentPanel;
        public IFileExplorerPanel.SubPanelFinishProcessRoutine FinishProcedure;

        /// <summary>Konstrktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_ResultInfo(int pWidth, string pText = "")
        {
            Width = pWidth; Height = 400; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(pText, ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label

            FBtn_OK = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_RESULT_INFO_TEXT_1, Event_BtnOKClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();
            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FBtn_OK, FLine }); // Zaradim do controls

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_OK, FLine, 0, 10);

            int H = ClientSize.Height - FBtn_OK.Bottom - 10;
            Height -= H; // Upravim automaticky hlbku

            FBtn_OK.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape) ParentPanel.FinishWorkMode(FinishProcedure, null);
            };

        }

        /// <summary>Event: OnClick pre tlacidlo OK</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnOKClick(object pSender, EventArgs e)
        {
            ParentPanel.FinishWorkMode(FinishProcedure, null);
        }
        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_OK.Focus();
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CalculateFolderSize</summary>
    public class IFileExplorer_ProgressForm_CalculateFolderSize : IFileExplorer_BaseProgressForm
    {
        protected ILabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_CalculateFolderSize(int pWidth, int pHeight, string pText = "")
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new ILabel(pText); FLabel.AutoSize = false; FLabel.BackColor = System.Drawing.SystemColors.Window; FLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; FLabel.SetBounds(10, 20, ClientSize.Width - 20, 20); // Vytvorim label

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FBtn_Cancel, FLine }); // Zaradim do controls
            IControl.PlaceControl_Inside_RightBottom_RightBottom(FBtn_Cancel, this, 10, 10);
            FLine.Left = 10; FLine.Top = FBtn_Cancel.Top - 10; FLine.Width = ClientSize.Width - 20;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape) WaitForTerminate.BoolValue = true;
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ChooseFromList</summary>
    public class IFileExplorer_ProgressForm_ChooseFromList : IFileExplorer_BaseProgressForm
    {
        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IHorizontalSplitLine FLine2;
        protected ICommandLinkButtonsPanel FBtnsPanel;

        public IThrSafeVariable CurrentState;
        public int ResultChoice;

        /// <summary>Konstruktor</summary>
        /// <param name="pParentPanel">rodicovsky panel</param>
        /// <param name="pWidth">sirka</param>
        /// <param name="pCaption">text nad volbami</param>
        /// <param name="pNames">nazvy</param>
        /// <param name="pNotes">volby</param>
        /// <param name="pDefaultChoice">prednastavena volba</param>
        /// <param name="pChoiceSeparator">oddelovac nazvov a popisov</param>
        public IFileExplorer_ProgressForm_ChooseFromList(IFileExplorerPanel pParentPanel, int pWidth, string pCaption, string pNames, string pNotes, int pDefaultChoice, char pChoiceSeparator = '\b')
        {
            CurrentState = new IThrSafeVariable(); CurrentState.IntValue = -1;
            Width = pWidth; Height = 500; // Ulozim rozmery

            FLabel = new IAutoHeightLabel(pCaption, ClientSize.Width - 30); // Vytvorim label

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine(); FLine2 = new IHorizontalSplitLine();
            FBtnsPanel = new ICommandLinkButtonsPanel();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FLine2, FBtnsPanel, FBtn_Cancel, FLine }); // Zaradim do controls
            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 15, 30);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine2, FLabel, 0, 20, ClientSize.Width - 30);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FBtnsPanel, FLine2, 0, 10); FBtnsPanel.Width = FLabel.Width; FBtnsPanel.Height = ClientSize.Height - FBtnsPanel.Top - 60;
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FBtnsPanel, 0, 10, ClientSize.Width - 30);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            FBtnsPanel.CreateButtons(pNames, pNotes, pDefaultChoice, pChoiceSeparator); // Vytvorim tlacidla
            int H = FBtnsPanel.ControlShrinkValue; // Treba zmensit okno?
            if (H > 0)
            {
                FBtnsPanel.Height -= H;
                FBtn_Cancel.Top -= H; Height -= H; FLine.Top -= H;
            }

            FBtnsPanel.ButtonClick += (s, e) =>
                {
                    ResultChoice = FBtnsPanel.ClickedButtonIndex;
                    CurrentState.IntValue = 0;
                };

            FBtn_Cancel.KeyDown += Event_KeyDown;
            FBtnsPanel.KeyDown += Event_KeyDown;
            this.KeyDown += Event_KeyDown;
            FBtnsPanel.SetButtonsKeyDownEvent(Event_KeyDown);

            FBtn_Cancel.Focus();
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtnsPanel.Focus();
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            CurrentState.IntValue = 0;
            ResultChoice = -1;
        }
        /// <summary>Metoda: OnPaint</summary>
        /// <param name="e">parameter</param>
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(System.Drawing.SystemBrushes.ButtonFace, e.ClipRectangle);
            System.Drawing.Rectangle R = e.ClipRectangle; R.Inflate(-6, -6);
            e.Graphics.DrawRectangle(System.Drawing.SystemPens.GradientActiveCaption, R);
            System.Windows.Forms.ControlPaint.DrawBorder3D(e.Graphics, e.ClipRectangle, System.Windows.Forms.Border3DStyle.Raised);
        }
        /// <summary>Event: KeyDown</summary>
        /// <param name="sender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
            {
                Event_BtnCancelClick(this, null);
            }
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ChooseFromList</summary>
    public class IFileExplorer_ProgressForm_EditString : IFileExplorer_BaseProgressForm
    {
        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IButton FBtn_OK;
        protected IHorizontalSplitLine FLine;
        protected ITextBox FText_Value;
        protected ILabel FLabel_Error;

        protected bool FCanBeEmpty;
        public IThrSafeVariable CurrentState; // Aktualny stav
        public string Value; // Editovany retazec

        /// <summary>Konstruktor</summary>
        /// <param name="pParentPanel">rodicovsky panel</param>
        /// <param name="pWidth">sirka</param>
        /// <param name="pCaption">text nad volbami</param>
        /// <param name="pNames">nazvy</param>
        /// <param name="pNotes">volby</param>
        /// <param name="pDefaultChoice">prednastavena volba</param>
        /// <param name="pChoiceSeparator">oddelovac nazvov a popisov</param>
        public IFileExplorer_ProgressForm_EditString(IFileExplorerPanel pParentPanel, int pWidth, string pCaption, string pValue, bool pCanBeEmpty = true, int pMaxLength = -1, string pAutoCompleteResourceName = null, string pAutoCompleteData = null, bool pPasswordMode = false)
        {
            CurrentState = new IThrSafeVariable(); CurrentState.IntValue = -1;
            Width = pWidth; Height = 500; // Ulozim rozmery
            FCanBeEmpty = pCanBeEmpty;

            FLabel = new IAutoHeightLabel(pCaption, ClientSize.Width - 30); // Vytvorim label

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FBtn_OK = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_EDIT_STRING_TEXT_1, Event_BtnOKClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();
            FText_Value = new ITextBox(); if (pMaxLength != -1) FText_Value.MaxLength = pMaxLength;
            if (pPasswordMode) FText_Value.PasswordChar = '*';
            FLabel_Error = new ILabel(lang.FILE_EXPLORER_PROGRESS_FORM_EDIT_STRING_TEXT_2); FLabel_Error.ForeColor = System.Drawing.Color.Red;

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FText_Value, FLabel_Error, FBtn_OK, FBtn_Cancel, FLine }); // Zaradim do controls
            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 15, 30);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FText_Value, FLabel, 0, 10, this.ClientSize.Width - 30);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLabel_Error, FText_Value, 0, 6);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FLabel_Error, 0, 10, ClientSize.Width - 30);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);
            IControl.PlaceControl_Outside_TopRight_LeftTop(FBtn_OK, FBtn_Cancel, 0, 10);

            Height = FBtn_Cancel.Bottom + 20;
            FText_Value.Text = pValue; FLabel_Error.Visible = false;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                }
            };
            FText_Value.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Enter)
                {
                    Event_BtnOKClick(this, null);
                }
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                }
            };
            FBtn_Cancel.Focus();
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FText_Value.Focus();
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            Value = null;
            CurrentState.IntValue = 0;
        }
        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnOKClick(object pSender, EventArgs e)
        {
            if (!FCanBeEmpty)
            {
                if (FText_Value.Text == "")
                {
                    FLabel_Error.Visible = true;
                    FText_Value.Focus();
                    return;
                }
            }
            Value = FText_Value.Text;
            CurrentState.IntValue = 0;
        }
        /// <summary>Metoda: OnPaint</summary>
        /// <param name="e">parameter</param>
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(System.Drawing.SystemBrushes.ButtonFace, e.ClipRectangle);
            System.Drawing.Rectangle R = e.ClipRectangle; R.Inflate(-6, -6);
            e.Graphics.DrawRectangle(System.Drawing.SystemPens.GradientActiveCaption, R);
            System.Windows.Forms.ControlPaint.DrawBorder3D(e.Graphics, e.ClipRectangle, System.Windows.Forms.Border3DStyle.Raised);
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_FileDirCount</summary>
    public class IFileExplorer_ProgressForm_FileDirCount : IFileExplorer_BaseProgressForm
    {
        public string Message_1, Message_2;

        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar;

        protected int FFilesCount; // Premenne
        protected int FDirsCount;
        protected System.Diagnostics.Stopwatch FUpdateWatch;
        protected int FItemsCount;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_FileDirCount(string pMessage_1, string pMessage_2, int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FFilesCount = FDirsCount = 0; FItemsCount = pItemsCount;
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            Message_1 = pMessage_1; Message_2 = pMessage_2;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(pShowProgressBar ? Message_2 : Message_1, 0, 0, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            if (pShowProgressBar)
            {
                FProgressBar = new IProgressBar(); FProgressBar.Minimum = 0; FProgressBar.Maximum = 10000;
            }
            else FProgressBar = null;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            if (FProgressBar != null) Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar, FBtn_Cancel, FLine }); // Zaradim do controls
            else Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FBtn_Cancel, FLine }); // Zaradim do controls

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            if (FProgressBar != null)
            {
                IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar, FLabel, 0, 10, ClientSize.Width - 20);
                IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar, 0, 10, ClientSize.Width - 20);
                Height += FProgressBar.Height + 10;
            }
            else IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FLabel, 0, 10, ClientSize.Width - 20); 
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Zaradenie vymazaneho suboru</summary>
        public void AddFile()
        {
            FFilesCount++;
            UpdateProgress(false);
        }
        /// <summary>Zaradenie vymazaneho priecinku</summary>
        public void AddDir()
        {
            FDirsCount++;
            UpdateProgress(false);
        }
        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            if (FProgressBar != null)
            {
                double D = Math.Round(((double)(FFilesCount + FDirsCount) / (double)FItemsCount) * 100.0, 1);
                FLabel.Text = string.Format(Message_2, FFilesCount, FDirsCount, D);
                FProgressBar.Value = (int)D*100;
            }
            else FLabel.Text = string.Format(Message_1, FFilesCount, FDirsCount);
            FUpdateWatch.Reset(); FUpdateWatch.Start();
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CopyItems</summary>
    public class IFileExplorer_ProgressForm_FileDirSize : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar;
        protected IProgressBar FProgressBar_Single;

        protected int FFilesCount, FSkippedFilesCount; // Premenne
        protected int FDirsCount, FSkippedDirsCount;
        protected System.Diagnostics.Stopwatch FUpdateWatch;
        protected int FItemsCount;
        protected ulong FItemsTotalSize;
        protected ulong FTotalSize, FCurrentSize, FExaminedCurrentSize;
        protected string FCurrentFileName;
        protected string FMessage_1, FMessage_2;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_FileDirSize(string pMessage1, string pMessage2, int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FFilesCount = FDirsCount = FSkippedFilesCount = FSkippedDirsCount = 0; FItemsCount = pItemsCount; FItemsTotalSize = pTotalSize;
            FTotalSize = FCurrentSize = FExaminedCurrentSize = 0; FCurrentFileName = " ";
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            FMessage_1 = pMessage1; FMessage_2 = pMessage2;

            ILabel L1, L2 = null; // Popisy progressov
            Width = pWidth; Height = pHeight; // Ulozim rozmery

            // Label s textom
            FLabel = new IAutoHeightLabel(string.Format(pShowProgressBar ? FMessage_2 : FMessage_1, 0, 0, 0, 0, 0, ICore.Size2String(0, 1), ICore.Size2String(0, 1), " "), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label

            // Pregress bar pre priebeh aktualneho suboru
            FProgressBar_Single = new IProgressBar(); FProgressBar_Single.Minimum = 0; FProgressBar_Single.Maximum = 10000;
            if (pShowProgressBar) // Zobrazit aj celkovy progress bar?
            {
                FProgressBar = new IProgressBar(); FProgressBar.Minimum = 0; FProgressBar.Maximum = 10000; // Vytvorim ho
                L2 = new ILabel(lang.FILE_EXPLORER_TEXT_20_6); L2.AutoSize = true; L2.BackColor = FLabel.BackColor; L2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            }
            else FProgressBar = null;

            L1 = new ILabel(lang.FILE_EXPLORER_TEXT_20_5); L1.AutoSize = true; L1.BackColor = FLabel.BackColor; L1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            if (FProgressBar != null) Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar, FBtn_Cancel, FLine, FProgressBar_Single, L1, L2 }); // Zaradim do controls
            else Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FBtn_Cancel, FLine, FProgressBar_Single, L1 }); // Zaradim do controls

            // Umiestnim
            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Single, FLabel, 0, 20, ClientSize.Width - 20);
            if (FProgressBar != null)
            {
                IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar, FProgressBar_Single, 0, 20, ClientSize.Width - 20);
                IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar, 0, 10, ClientSize.Width - 20);
                Height += FProgressBar.Height + 10;
                IControl.PlaceControl_Outside_TopRight_TopRight(L2, FProgressBar, 0, 2);
            }
            else IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar_Single, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);
            IControl.PlaceControl_Outside_TopRight_TopRight(L1, FProgressBar_Single, 0, 2);

            Height = FBtn_Cancel.Bottom + 10; // Nastavim 

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
            this.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Nastavenie aktualnej velkosti suboru</summary>
        /// <param name="pName">nazov aktualneho suboru</param>
        /// <param name="pSize">velkost</param>
        public void SetCurrentFileSize(long pSize, string pName)
        {
            FCurrentFileName = pName.Length < 90 ? pName : pName.Substring(0, 42) + "..." + pName.Substring(pName.Length - 45);
            FExaminedCurrentSize = (ulong)pSize;
            FCurrentSize = 0;
            UpdateProgress(false);
        }
        /// <summary>Zaradenie vymazaneho suboru</summary>
        public void AddFile(bool pSkipped = false)
        {
            if (pSkipped) FSkippedFilesCount++; else FFilesCount++;
            UpdateProgress(false);
        }
        /// <summary>Zaradenie vymazaneho priecinku</summary>
        public void AddDir(bool pSkipped = false)
        {
            if (pSkipped) FSkippedDirsCount++; else FDirsCount++;
            UpdateProgress(false);
        }
        /// <summary>Pridanie poctu prenesenych dat</summary>
        /// <param name="pSize">velkost alebo -1 pre odstranenie aktualneho prenosu</param>
        public void AddTransferredDataSize(long pSize)
        {
            if (pSize < 0)
            {
                FTotalSize -= FCurrentSize;
            }
            else
            {
                FTotalSize += (ulong)pSize;
                FCurrentSize += (ulong)pSize;
            }
            if (pSize == 0) FCurrentSize = 0;
            UpdateProgress(false);
        }
        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            try
            {
                if ((long)FExaminedCurrentSize == -1) FProgressBar_Single.Value = 0; // Bar pre subor
                else
                {
                    double D = FCurrentSize == FExaminedCurrentSize ? 100.0 : Math.Round(((double)(FCurrentSize) / (double)FExaminedCurrentSize) * 100.0, 1);
                    FProgressBar_Single.Value = (int)D * 100;
                }

                if (FProgressBar != null) // Bar pre spolocny priebeh
                {
                    double D = FItemsTotalSize == 0 ? Math.Round(((double)(FFilesCount + FDirsCount) / (double)FItemsCount) * 100.0, 1) : Math.Round(((double)(FTotalSize) / (double)FItemsTotalSize) * 100.0, 1);
                    FLabel.Text = string.Format(FMessage_2, FFilesCount, FDirsCount, FSkippedFilesCount, FSkippedDirsCount, D, ICore.Size2String(FTotalSize, 0), ICore.Size2String(FCurrentSize, 0), FCurrentFileName);
                    FProgressBar.Value = (int)D * 100;
                }
                else FLabel.Text = string.Format(FMessage_1, FFilesCount, FDirsCount, FSkippedFilesCount, FSkippedDirsCount, ICore.Size2String(FTotalSize, 0), ICore.Size2String(FCurrentSize, 0), FCurrentFileName);
                FUpdateWatch.Reset(); FUpdateWatch.Start();
            }
            catch
            {
            }
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_TestArchive</summary>
    public class IFileExplorer_ProgressForm_TestArchive : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;

        protected int FFilesCount, FDirsCount; // Pocty
        protected string FArchiveType; // Typ archivu
        protected string FAtrchiveFileName; // Nazov archivu
        protected string FCurrentFile; // Nazov aktualneho suboru
        protected System.Diagnostics.Stopwatch FUpdateWatch;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_TestArchive(int pWidth, int pHeight)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia

            FFilesCount = FDirsCount = 0; // Inicializujem premenne
            FAtrchiveFileName = "";
            FArchiveType = "";
            FUpdateWatch = new System.Diagnostics.Stopwatch();

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(lang.FILE_EXPLORER_TEXT_22_2, "", "", 0, 0, ""), ClientSize.Width - 20); // Vytvorim label
            FLabel.BackColor = System.Drawing.SystemColors.Window;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FBtn_Cancel, FLine }); // Zaradim do controls

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            Height = FBtn_Cancel.Bottom + 10;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape) WaitForTerminate.BoolValue = true;
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Zaciatok dalsieho archivu</summary>
        /// <param name="pFileName">nazov archivu</param>
        /// <param name="pType">typ</param>
        public void StartArchive(string pFileName, string pType)
        {
            FAtrchiveFileName = pFileName;
            FArchiveType = pType;
            FFilesCount = 0; FDirsCount = 0;
            FCurrentFile = "";
            UpdateProgress(true);
        }
        /// <summary>Zaciatok dalsieho archivu</summary>
        /// <param name="pFileName">nazov archivu</param>
        /// <param name="pType">typ</param>
        public void StartArchiveVolume(string pFileName, string pType)
        {
            FAtrchiveFileName = pFileName;
            FArchiveType = pType;
            //FFilesCount = 0; FDirsCount = 0;
            FCurrentFile = "";
            UpdateProgress(true);
        }
        /// <summary>Oznamenie o zaciatku spracovania suboru</summary>
        /// <param name="pName">nazov</param>
        public void StartFile(string pName)
        {
            FCurrentFile = pName;
            UpdateProgress(true);
        }
        /// <summary>Oznamenie o dokonceni testu suboru</summary>
        public void FinishFile()
        {
            FFilesCount++;
            UpdateProgress(false);
        }
        /// <summary>Zaradenie priecinku medzi otestovane</summary>
        public void AddDir()
        {
            FDirsCount++;
            UpdateProgress(false);
        }
        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            FLabel.Text = string.Format(lang.FILE_EXPLORER_TEXT_22_2, FArchiveType, FAtrchiveFileName, FFilesCount, FDirsCount, FCurrentFile);

            FUpdateWatch.Reset(); FUpdateWatch.Start();
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_SplitFile</summary>
    public class IFileExplorer_ProgressForm_SplitFile : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar_Part;
        protected IProgressBar FProgressBar_Total;

        protected System.Diagnostics.Stopwatch FUpdateWatch; // Premenne
        protected long FSourceSize;
        protected long FPartSize;
        protected string FCurrentFile;
        protected long FTotalDone, FPartDone;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_SplitFile(int pWidth, int pHeight, long pSourceSize, long pPartSize)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            FSourceSize = pSourceSize; FPartSize = pPartSize; FCurrentFile = "";
            FTotalDone = FPartDone = 0;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(lang.FILE_EXPLORER_TEXT_26_2, "", 0, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            FProgressBar_Part = new IProgressBar(); FProgressBar_Part.Minimum = 0; FProgressBar_Part.Maximum = 10000;
            FProgressBar_Total = new IProgressBar(); FProgressBar_Total.Minimum = 0; FProgressBar_Total.Maximum = 10000;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar_Part, FProgressBar_Total, FBtn_Cancel, FLine });

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Part, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Total, FProgressBar_Part, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar_Total, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            Height = FBtn_Cancel.Bottom + 10;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Zaciatok vytvarania dalsej casti</summary>
        /// <param name="pName">nazov casti</param>
        /// <param name="pLength">dlzka casti</param>
        public void StartPart(string pName, long pLength)
        {
            FCurrentFile = pName;
            FPartSize = pLength;
            FPartDone = 0;
            UpdateProgress(true); // Okamzite aktualizujem
        }
        /// <summary>Zaznamenanie spracovanych dat</summary>
        /// <param name="pSize">dlzka</param>
        public void AddDoneData(int pSize)
        {
            FPartDone += pSize;
            FTotalDone += pSize;
            UpdateProgress(true); // Okamzite aktualizujem
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            double D1 = Math.Round(((double)(FPartDone) / (double)FPartSize) * 100.0, 1);
            double D2 = Math.Round(((double)(FTotalDone) / (double)FSourceSize) * 100.0, 1);
            int D11 = (int)(D1) * 100;
            int D21 = (int)(D2) * 100;
            if ((D11 >= FProgressBar_Part.Minimum) && (D11 < FProgressBar_Part.Maximum)) FProgressBar_Part.Value = D11;
            if ((D21 >= FProgressBar_Total.Minimum) && (D21 < FProgressBar_Total.Maximum)) FProgressBar_Total.Value = D21;

            FLabel.Text = string.Format(lang.FILE_EXPLORER_TEXT_26_2, FCurrentFile, D1, D2);
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_SingleProgress</summary>
    public class IFileExplorer_ProgressForm_SingleProgress : IFileExplorer_BaseProgressForm
    {
        public string Message;

        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar;

        protected System.Diagnostics.Stopwatch FUpdateWatch;
        protected long FCounter;
        protected long FCurrentCounter;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_SingleProgress(string pMessage, int pWidth, int pHeight, long pCounter)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            Message = pMessage; FCounter = pCounter; FCurrentCounter = 0;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(Message, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            FProgressBar = new IProgressBar(); FProgressBar.Minimum = 0; FProgressBar.Maximum = 10000;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar, FBtn_Cancel, FLine }); // Zaradim do controls

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar, 0, 10, ClientSize.Width - 20);
            Height += FProgressBar.Height + 10;
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Zaradenie vymazaneho suboru</summary>
        public void AddProcessedData(long pCounter)
        {
            FCurrentCounter += pCounter;
            UpdateProgress(false);
        }
        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            double D = Math.Round(((double)(FCurrentCounter) / (double)FCounter) * 100.0, 1);
            FLabel.Text = string.Format(Message, D);
            FProgressBar.Value = (int)D * 100;
            FUpdateWatch.Reset(); FUpdateWatch.Start();
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_DeleteItems</summary>
    public class IFileExplorer_ProgressForm_DeleteItems : IFileExplorer_ProgressForm_FileDirCount
    {
        /// <summary>Konstruktor</summary>
        public IFileExplorer_ProgressForm_DeleteItems(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount) : base(lang.FILE_EXPLORER_TEXT_19_5, lang.FILE_EXPLORER_TEXT_19_6, pWidth, pHeight, pShowProgressBar, pItemsCount)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CreateLinks</summary>
    public class IFileExplorer_ProgressForm_CreateLinks : IFileExplorer_ProgressForm_FileDirCount
    {
        /// <summary>Konstruktor</summary>
        public IFileExplorer_ProgressForm_CreateLinks(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount)
            : base(lang.FILE_EXPLORER_TEXT_37_1, lang.FILE_EXPLORER_TEXT_37_2, pWidth, pHeight, pShowProgressBar, pItemsCount)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CopyItems</summary>
    public class IFileExplorer_ProgressForm_CopyItems : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_CopyItems(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_20_2, lang.FILE_EXPLORER_TEXT_20_3, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_MoveItems</summary>
    public class IFileExplorer_ProgressForm_MoveItems : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_MoveItems(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_21_2, lang.FILE_EXPLORER_TEXT_21_3, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ExtractArchive</summary>
    public class IFileExplorer_ProgressForm_ExtractArchive : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_ExtractArchive(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_24_2, lang.FILE_EXPLORER_TEXT_24_3, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ChangeItemsAttributes</summary>
    public class IFileExplorer_ProgressForm_ChangeItemsAttributes : IFileExplorer_ProgressForm_FileDirCount
    {
        /// <summary>Konstruktor</summary>
        public IFileExplorer_ProgressForm_ChangeItemsAttributes(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount)
            : base(lang.FILE_EXPLORER_TEXT_25_1, lang.FILE_EXPLORER_TEXT_25_2, pWidth, pHeight, pShowProgressBar, pItemsCount)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_DeleteItems</summary>
    public class IFileExplorer_ProgressForm_ExportListOfItems : IFileExplorer_ProgressForm_FileDirCount
    {
        /// <summary>Konstruktor</summary>
        public IFileExplorer_ProgressForm_ExportListOfItems(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount)
            : base(lang.FILE_EXPLORER_TEXT_40_2, lang.FILE_EXPLORER_TEXT_40_3, pWidth, pHeight, pShowProgressBar, pItemsCount)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_EncryptFiles</summary>
    public class IFileExplorer_ProgressForm_EncryptFiles : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_EncryptFiles(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_41_3, lang.FILE_EXPLORER_TEXT_41_4, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_DecryptFiles</summary>
    public class IFileExplorer_ProgressForm_DecryptFiles : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_DecryptFiles(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_42_6, lang.FILE_EXPLORER_TEXT_42_7, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_ChangeItemsAttributes</summary>
    public class IFileExplorer_ProgressForm_MultiRename : IFileExplorer_ProgressForm_FileDirCount
    {
        /// <summary>Konstruktor</summary>
        public IFileExplorer_ProgressForm_MultiRename(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount)
            : base(lang.FILE_EXPLORER_TEXT_47_1, lang.FILE_EXPLORER_TEXT_47_2, pWidth, pHeight, pShowProgressBar, pItemsCount)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_JoinFiles</summary>
    public class IFileExplorer_ProgressForm_JoinFiles : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar_Part;
        protected IProgressBar FProgressBar_Total;

        protected System.Diagnostics.Stopwatch FUpdateWatch; // Premenne
        protected long FSourceSize;
        protected long FPartSize;
        protected string FCurrentFile;
        protected long FTotalDone, FPartDone;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_JoinFiles(int pWidth, int pHeight, long pSourceSize)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            FSourceSize = pSourceSize; FPartSize = 0; FCurrentFile = "";
            FTotalDone = FPartDone = 0;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(lang.FILE_EXPLORER_TEXT_26_7, "", 0, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            FProgressBar_Part = new IProgressBar(); FProgressBar_Part.Minimum = 0; FProgressBar_Part.Maximum = 10000;
            FProgressBar_Total = new IProgressBar(); FProgressBar_Total.Minimum = 0; FProgressBar_Total.Maximum = 10000;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar_Part, FProgressBar_Total, FBtn_Cancel, FLine });

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Part, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Total, FProgressBar_Part, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar_Total, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            Height = FBtn_Cancel.Bottom + 10;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Zaciatok vytvarania dalsej casti</summary>
        /// <param name="pName">nazov casti</param>
        /// <param name="pLength">dlzka casti</param>
        public void StartPart(string pName, long pLength)
        {
            FCurrentFile = pName;
            FPartSize = pLength;
            FPartDone = 0;
            UpdateProgress(true); // Okamzite aktualizujem
        }
        /// <summary>Zaznamenanie spracovanych dat</summary>
        /// <param name="pSize">dlzka</param>
        public void AddDoneData(int pSize)
        {
            FPartDone += pSize;
            FTotalDone += pSize;
            UpdateProgress(true); // Okamzite aktualizujem
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            double D1 = Math.Round(((double)(FPartDone) / (double)FPartSize) * 100.0, 1);
            double D2 = Math.Round(((double)(FTotalDone) / (double)FSourceSize) * 100.0, 1);
            int D11 = (int)(D1) * 100;
            int D21 = (int)(D2) * 100;
            if ((D11 >= FProgressBar_Part.Minimum) && (D11 < FProgressBar_Part.Maximum)) FProgressBar_Part.Value = D11;
            if ((D21 >= FProgressBar_Total.Minimum) && (D21 < FProgressBar_Total.Maximum)) FProgressBar_Total.Value = D21;

            FLabel.Text = string.Format(lang.FILE_EXPLORER_TEXT_26_7, FCurrentFile, D1, D2);
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_GenerateChecksum</summary>
    public class IFileExplorer_ProgressForm_GenerateChecksum : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar_Part;
        protected IProgressBar FProgressBar_Total;

        protected System.Diagnostics.Stopwatch FUpdateWatch; // Premenne
        protected long FSourceSize;
        protected long FPartSize;
        protected string FCurrentFile;
        protected long FTotalDone, FPartDone;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_GenerateChecksum(int pWidth, int pHeight, long pSourceSize)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            FSourceSize = pSourceSize; FPartSize = 0; FCurrentFile = "";
            FTotalDone = FPartDone = 0;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(lang.FILE_EXPLORER_TEXT_28_1, "", 0, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            FProgressBar_Part = new IProgressBar(); FProgressBar_Part.Minimum = 0; FProgressBar_Part.Maximum = 10000;
            FProgressBar_Total = new IProgressBar(); FProgressBar_Total.Minimum = 0; FProgressBar_Total.Maximum = 10000;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar_Part, FProgressBar_Total, FBtn_Cancel, FLine });

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Part, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Total, FProgressBar_Part, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar_Total, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            Height = FBtn_Cancel.Bottom + 10;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Zaciatok vytvarania dalsej casti</summary>
        /// <param name="pName">nazov casti</param>
        /// <param name="pLength">dlzka casti</param>
        public void StartPart(string pName, long pLength)
        {
            FCurrentFile = pName;
            FPartSize = pLength;
            FPartDone = 0;
            UpdateProgress(true); // Okamzite aktualizujem
        }
        /// <summary>Zaznamenanie spracovanych dat</summary>
        /// <param name="pSize">dlzka</param>
        public void AddDoneData(int pSize)
        {
            FPartDone += pSize;
            FTotalDone += pSize;
            UpdateProgress(true); // Okamzite aktualizujem
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            double D1 = Math.Round(((double)(FPartDone) / (double)FPartSize) * 100.0, 1);
            double D2 = Math.Round(((double)(FTotalDone) / (double)FSourceSize) * 100.0, 1);
            int D11 = (int)(D1) * 100;
            int D21 = (int)(D2) * 100;
            if ((D11 >= FProgressBar_Part.Minimum) && (D11 < FProgressBar_Part.Maximum)) FProgressBar_Part.Value = D11;
            if ((D21 >= FProgressBar_Total.Minimum) && (D21 < FProgressBar_Total.Maximum)) FProgressBar_Total.Value = D21;

            FLabel.Text = string.Format(lang.FILE_EXPLORER_TEXT_28_1, FCurrentFile, D1, D2);
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_VerifyChecksum</summary>
    public class IFileExplorer_ProgressForm_VerifyChecksum : IFileExplorer_BaseProgressForm
    {
        public delegate void Delegate_UpdateProgress(bool pForce);

        protected IAutoHeightLabel FLabel; // Controls
        protected IButton FBtn_Cancel;
        protected IHorizontalSplitLine FLine;
        protected IProgressBar FProgressBar_Part;
        protected IProgressBar FProgressBar_Total;

        protected System.Diagnostics.Stopwatch FUpdateWatch; // Premenne
        protected long FSourceSize;
        protected long FPartSize;
        protected string FCurrentFile;
        protected long FTotalDone, FPartDone;

        public IThrSafeVariable WaitForTerminate; // Priznak stlacenia cancel tlacidla

        /// <summary>Konstruktor</summary>
        /// <param name="pWidth">sirka</param>
        /// <param name="pHeight">hlbka</param>
        /// <param name="pText">text</param>
        public IFileExplorer_ProgressForm_VerifyChecksum(int pWidth, int pHeight, long pSourceSize)
        {
            WaitForTerminate = new IThrSafeVariable();
            WaitForTerminate.BoolValue = false; // Inicializacia
            FUpdateWatch = new System.Diagnostics.Stopwatch();
            FSourceSize = pSourceSize; FPartSize = 0; FCurrentFile = "";
            FTotalDone = FPartDone = 0;

            Width = pWidth; Height = pHeight; // Ulozim rozmery
            FLabel = new IAutoHeightLabel(string.Format(lang.FILE_EXPLORER_TEXT_29_1, "", 0, 0), ClientSize.Width - 20); FLabel.BackColor = System.Drawing.SystemColors.Window; // Vytvorim label
            FProgressBar_Part = new IProgressBar(); FProgressBar_Part.Minimum = 0; FProgressBar_Part.Maximum = 10000;
            FProgressBar_Total = new IProgressBar(); FProgressBar_Total.Minimum = 0; FProgressBar_Total.Maximum = 10000;

            FBtn_Cancel = new IButton(lang.FILE_EXPLORER_PROGRESS_FORM_CALCULATE_FOLDER_SIZE_TEXT_1, Event_BtnCancelClick); // Vytvorim tlacidlo
            FLine = new IHorizontalSplitLine();

            Controls.AddRange(new System.Windows.Forms.Control[] { FLabel, FProgressBar_Part, FProgressBar_Total, FBtn_Cancel, FLine });

            IControl.PlaceControl_Inside_LeftTop_LeftTop(FLabel, this, 10, 10);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Part, FLabel, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FProgressBar_Total, FProgressBar_Part, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_LeftTop_LeftBottom(FLine, FProgressBar_Total, 0, 10, ClientSize.Width - 20);
            IControl.PlaceControl_Outside_TopRight_RightBottom(FBtn_Cancel, FLine, 0, 10);

            Height = FBtn_Cancel.Bottom + 10;

            FBtn_Cancel.KeyDown += (s, e) =>
            {
                if (e.KeyCode == System.Windows.Forms.Keys.Escape)
                {
                    Event_BtnCancelClick(this, null);
                    return;
                }
            };
        }

        /// <summary>Event: OnClick pre tlacidlo cancel</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnCancelClick(object pSender, EventArgs e)
        {
            WaitForTerminate.BoolValue = true;
        }

        /// <summary>Zaciatok vytvarania dalsej casti</summary>
        /// <param name="pName">nazov casti</param>
        /// <param name="pLength">dlzka casti</param>
        public void StartPart(string pName, long pLength)
        {
            FCurrentFile = pName;
            FPartSize = pLength;
            FPartDone = 0;
            UpdateProgress(true); // Okamzite aktualizujem
        }
        /// <summary>Zaznamenanie spracovanych dat</summary>
        /// <param name="pSize">dlzka</param>
        public void AddDoneData(int pSize)
        {
            FPartDone += pSize;
            FTotalDone += pSize;
            UpdateProgress(true); // Okamzite aktualizujem
        }

        /// <summary>Aktivacia panela</summary>
        public override void ActivatePanel()
        {
            FBtn_Cancel.Focus();
        }

        /// <summary>Aktualizacia priebehu</summary>
        /// <param name="pForce">priznak okamzitej aktualizacie</param>
        public void UpdateProgress(bool pForce)
        {
            if (InvokeRequired)
            {
                if ((pForce) || (!FUpdateWatch.IsRunning) || (FUpdateWatch.ElapsedMilliseconds > 100))
                {
                    Invoke(new Delegate_UpdateProgress(UpdateProgress), new object[] { true });
                }
                return;
            }

            double D1 = Math.Round(((double)(FPartDone) / (double)FPartSize) * 100.0, 1);
            double D2 = Math.Round(((double)(FTotalDone) / (double)FSourceSize) * 100.0, 1);
            int D11 = (int)(D1) * 100;
            int D21 = (int)(D2) * 100;
            if ((D11 >= FProgressBar_Part.Minimum) && (D11 < FProgressBar_Part.Maximum)) FProgressBar_Part.Value = D11;
            if ((D21 >= FProgressBar_Total.Minimum) && (D21 < FProgressBar_Total.Maximum)) FProgressBar_Total.Value = D21;

            FLabel.Text = string.Format(lang.FILE_EXPLORER_TEXT_29_1, FCurrentFile, D1, D2);
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CloneFile</summary>
    public class IFileExplorer_ProgressForm_CloneFile : IFileExplorer_ProgressForm_SingleProgress
    {
        public IFileExplorer_ProgressForm_CloneFile(int pWidth, int pHeight, long pCounter)
            : base(lang.FILE_EXPLORER_TEXT_38_4, pWidth, pHeight, pCounter)
        {
        }
        public IFileExplorer_ProgressForm_CloneFile(string pMessage, int pWidth, int pHeight, long pCounter)
            : base(pMessage, pWidth, pHeight, pCounter)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CopyFileForView</summary>
    public class IFileExplorer_ProgressForm_CopyFileForView : IFileExplorer_ProgressForm_CloneFile
    {
        public IFileExplorer_ProgressForm_CopyFileForView(int pWidth, int pHeight, long pCounter)
            : base(lang.FILE_EXPLORER_TEXT_44_1, pWidth, pHeight, pCounter)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CloneFile</summary>
    public class IFileExplorer_ProgressForm_CreateFileFromClipboard : IFileExplorer_ProgressForm_SingleProgress
    {
        public IFileExplorer_ProgressForm_CreateFileFromClipboard(int pWidth, int pHeight, long pCounter)
            : base(lang.FILE_EXPLORER_TEXT_45_8, pWidth, pHeight, pCounter)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CopyFileForEdit</summary>
    public class IFileExplorer_ProgressForm_CopyFileForEdit : IFileExplorer_ProgressForm_CloneFile
    {
        public IFileExplorer_ProgressForm_CopyFileForEdit(int pWidth, int pHeight, long pCounter)
            : base(lang.FILE_EXPLORER_TEXT_44_2, pWidth, pHeight, pCounter)
        {
        }
    }

    /// <summary>Trieda IFileExplorer_ProgressForm_CompressItems</summary>
    public class IFileExplorer_ProgressForm_CompressItems : IFileExplorer_ProgressForm_FileDirSize
    {
        public IFileExplorer_ProgressForm_CompressItems(int pWidth, int pHeight, bool pShowProgressBar, int pItemsCount, ulong pTotalSize)
            : base(lang.FILE_EXPLORER_TEXT_39_5, lang.FILE_EXPLORER_TEXT_39_6, pWidth, pHeight, pShowProgressBar, pItemsCount, pTotalSize)
        {
        }
    }

}
